﻿@using CommandLib
@using FindArtInfo.Models
@using Resources
@model PagePriceModel
@{
    ViewBag.Title = "Art auction result for artist A. " + HttpUtility.HtmlDecode(Model.Artists.FullName) + ". Free art prices";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<table border="0" width="100%" id="table5" cellspacing="0" cellpadding="0">
    <tr>
        <td align="left" valign="top">
            &nbsp;
            
        </td>
    </tr>
    <tr>
        <td align="left" valign="top">
            <h1 class="underline">
                @string.Format(Multi.PagePricesTitle, HttpUtility.HtmlDecode(Model.Artists.FullName))</h1>
            <table border="0" cellspacing="0" cellpadding="2" width="100%" style="margin-top:5px">                                
                <tr>
                    <td width="72" height="18"><b>@Html.LabelFor(m=>m.ListPricesArtistBorn, Multi.PagePricesArtistBorn)</b></td>
                    <td width="72" height="18">@(Model.Artists.Born==0 ? "N/A" : Model.Artists.Born.ToString())</td>
                    <td width="350" height="18" rowspan="3">
                        @if(Model.Artists.CountArtistLink > 0){
                            <p align='center' class='faktabox1'>                                                                
                                <a href="~/@Utils.GetUrlByLanguage(CookiesStore.GetCookies(Constants.Cookie.COOKIE_LANGUAGE))/artist-link/@Model.Artists.ArtistId/@(Utils.UnicodeToKoDauAndGach(Model.Artists.FullName)).html" target = "_blank" title = "@string.Format(Multi.PagePriceArtistLink, Model.Artists.FullName)">
                                    @string.Format(Multi.PagePriceArtistLink, HttpUtility.HtmlDecode(Model.Artists.FullName))
                                </a>
                            </p>
					    }
                    </td>
                    <td style="text-align: center;" rowspan="3" height="18">                    
                    </td>
                    <td width="100" height="18" align="right">
                        <span>
                            @Html.ActionLink(Multi.PagePricesBack, null, null, new { @href = "javascript:window.history.back()"})
                        </span>
                    </td>
                </tr>
                <tr>
                    <td width="72" height="18"><b>@Html.LabelFor(m=>m.ListPricesArtistDie, Multi.PagePricesArtistDie)</b></td>
                    <td width="72" height="18">
                        @(Model.Artists.Died == 0? "N/A" : Model.Artists.Died.ToString())
                    </td>
                    <td height="18" align="right">
                        <span>
                            &nbsp;</span>
                    </td>
                </tr>
                <tr>
                    <td width="72" height="18"><b>@Html.LabelFor(m=>m.ListPricesCountryName, Multi.PagePricesCountryName)</b></td>
                    <td width="200" height="18">
                        @(Model.Artists.Country)
                    </td>
                    <td height="18" align="right">
                        <span>                                                        
                            <a href="~/@Utils.GetUrlByLanguage(CookiesStore.GetCookies(Constants.Cookie.COOKIE_LANGUAGE))/advanced-search.html">@Multi.PagePriceDetailNewSearch</a>
                        </span>
                    </td>
                </tr>
            </table>
            <h2>                                
                @(string.Format(Multi.PagePricesMessage, Utils.FomatNumber(Model.TotalRecord.ToString()), Utils.FomatNumber(Model.PageIndex.ToString()), Utils.FomatNumber(Model.TotalPage.ToString()), Utils.FomatNumber(Model.PageSize.ToString())))
                @if(Model.Artists.CountSignatures > 0){                                        
                    <a href="~/@Utils.GetUrlByLanguage(CookiesStore.GetCookies(Constants.Cookie.COOKIE_LANGUAGE))/list-signatures-by-artist/@Model.Artists.ArtistId/@(Utils.UnicodeToKoDauAndGach(Model.Artists.FullName)).html">@Model.Artists.CountSignatures</a>
                    <img src='/Content/Images/icon_fjer.gif' width='20' height='20' align='absbottom' alt="findartinfo.com">
                } else {
                    @(Model.Artists.CountSignatures)
                }
            </h2>
            <table border="0" cellspacing="0" cellpadding="0" width="100%">                
                <tr>
                    <td width="72" height="18" bgcolor="#525E54"> &nbsp;</td>
                    <td bgcolor="#525E54" height="18" width="93">                                                
                    <a href="~/@Utils.GetUrlByLanguage(CookiesStore.GetCookies(Constants.Cookie.COOKIE_LANGUAGE))/list-prices-by-artist/1/@Model.Artists.ArtistId/@(Utils.UnicodeToKoDauAndGach(Model.Artists.FullName))/page/1.html" title="@Multi.PagePricesOrderByDate" style = "color:#FFFFFF;font-weight: bolder">@Multi.PagePricesTblHeaderAuctionTime</a>
                    </td>
                    <td width="333" height="18" bgcolor="#525E54">                                                
                    <a href="~/@Utils.GetUrlByLanguage(CookiesStore.GetCookies(Constants.Cookie.COOKIE_LANGUAGE))/list-prices-by-artist/2/@Model.Artists.ArtistId/@(Utils.UnicodeToKoDauAndGach(Model.Artists.FullName))/page/1.html" title="@Multi.PagePricesOrderByTitle" style = "color:#FFFFFF;font-weight: bolder">@Multi.PagePricesTblHeaderItemName</a>
                    </td>
                    <td width="162" height="18" bgcolor="#525E54">                                                
                    <a href="~/@Utils.GetUrlByLanguage(CookiesStore.GetCookies(Constants.Cookie.COOKIE_LANGUAGE))/list-prices-by-artist/3/@Model.Artists.ArtistId/@(Utils.UnicodeToKoDauAndGach(Model.Artists.FullName))/page/1.html" title="@Multi.PagePricesOrderBySize" style = "color:#FFFFFF;font-weight: bolder">@Multi.PagePricesTblHeaderSize</a>
                    </td>
                    <td width="88" height="18" align="left" bgcolor="#525E54">                                                
                    <a href="~/@Utils.GetUrlByLanguage(CookiesStore.GetCookies(Constants.Cookie.COOKIE_LANGUAGE))/list-prices-by-artist/5/@Model.Artists.ArtistId/@(Utils.UnicodeToKoDauAndGach(Model.Artists.FullName))/page/1.html" title="@Multi.PagePricesOrderByMedium" style = "color:#FFFFFF;font-weight: bolder">@Multi.PagePricesTblHeaderMedium</a>
                    </td>
                    <td width="88" height="18" align="right" bgcolor="#525E54">                                                
                    <a href="~/@Utils.GetUrlByLanguage(CookiesStore.GetCookies(Constants.Cookie.COOKIE_LANGUAGE))/list-prices-by-artist/4/@Model.Artists.ArtistId/@(Utils.UnicodeToKoDauAndGach(Model.Artists.FullName))/page/1.html" title="@Multi.PagePricesOrderByPrice" style = "color:#FFFFFF;font-weight: bolder">@Multi.PagePricesTblHeaderPrice</a>
                    </td>
                </tr>
                @foreach(var item in Model.ListPrice)
                {
                    <tr onmouseover="this.style.backgroundColor = '#EEEEEE' " onmouseout=" this.style.backgroundColor = '#FFFFFF'">
                        <td>
                            <img height="20" width="20" class="hand" alt="@(string.Format(Multi.PagePricesTblContentHammerPrices, HttpUtility.HtmlDecode(Model.Artists.FullName)))" src="/Content/Images/icon_hammer.gif"
                                 border="0">                 
                            @if(item.CountArtWork > 0) {      
                                <img height="20" width="20" class="hand" alt="@(string.Format(Multi.PagePricesTblContentHammerArtWok, HttpUtility.HtmlDecode(Model.Artists.FullName)))"
                                 src="/Content/Images/icon_photo.gif" border="0">  
                            }                      
                        </td>
                        <td>
                            @(item.AuctionTime.ToString("MM-dd-yyyy"))
                        </td>                    
                        <td>                        
                            <span  class='linkgoogle'>                                                            
                                <a href="~/@Utils.GetUrlByLanguage(CookiesStore.GetCookies(Constants.Cookie.COOKIE_LANGUAGE))/price-info/@item.ID/@(Utils.UnicodeToKoDauAndGach(item.ItemName)).html">@HttpUtility.HtmlDecode(item.ItemName)</a>
                            </span>
                        </td>
                        <td>
                            @{
                                decimal H = item.Height == null ? 0 : item.Height;
                                decimal W = item.Width == null ? 0 : item.Width;
                                decimal D = item.Depth == null ? 0 : item.Depth;
                                
                                if (D == 0)
                                {
                                    <span>@((H + " x " + W + " in"))</span>
                                }
                                else
                                {
                                    <span>@((H + " x " + W + " x " + D + " in"))</span>
                                }
                                
                            }
                        </td>                                            
                        <td>
                            @(item.ItemTypeName)
                        </td>
                        <td align="right">
                            @(item.PriceInUS > 0 ? Utils.FomatNumber(item.PriceInUS.ToString()) + " USD" : "Unsold")
                        </td>
                    </tr>
                }
                <tr align="left" height="35px">
                    <td colspan="5">
                        @Html.Partial("_PartialPagingReWrite", new PartialPagingModel { PageIndex = Model.PageIndex, PageSize = Model.PageSize, TotalPage = Model.TotalPage, TotalRecord = Model.TotalRecord, Url = Model.Url })
                    </td>
                </tr>
            </table>
            <br>
            <h2>
                @(Html.Raw(string.Format(Multi.PagePricesFooter, HttpUtility.HtmlDecode(Model.Artists.FullName))))
            </h2>
        </td>
    </tr>
</table>